home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NOVA - For the NeXT Workstation
/
NOVA - For the NeXT Workstation.iso
/
SourceCode
/
OOP_Course
/
Examples
/
Line
/
LineView.m
< prev
next >
Wrap
Text File
|
1992-12-19
|
479b
|
27 lines
#import "LineView.h"
@implementation LineView
- takeSliderInput:sender
{
xSlider = [sender floatValue];
[self display];
return self;
}
- drawSelf:(const NXRect*)r :(int)c
{
PSsetgray(NX_WHITE);
NXRectFill(&bounds); //erase the present view
PSsetgray(NX_BLACK);
PSsetlinewidth(5.0);
PSnewpath();
PSmoveto(bounds.size.width/2.0, 10.0);
PSlineto(xSlider*bounds.size.width, bounds.size.height - 10.0);
PSstroke();
return self;
}
@end